PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUSetTransientFontMatching

Provides automatic font substitution when a character(s) cannot be drawn with the assigned font.

OSStatus ATSUSetTransientFontMatching (
                     ATSUTextLayout iTextLayout,
                     Boolean iTransientFontMatching);
iTextLayout
A reference of type ATSUTextLayout. Pass a reference to an initialized text layout object. You cannot pass NULL for this parameter.

iTransientFontMatching
A Boolean value. Pass a value that indicates whether you want ATSUI to perform automatic font substitution when a character(s) could not be drawn with the assigned font. If true, ATSUI will perform automatic font substitution.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUSetTransientFontMatching function provides automatic font substitution when a character(s) cannot be drawn with the assigned font. Like ATSUMatchFontsToText, ATSUSetTransientFontMatching uses the default search behavior of scanning all valid fonts on the user's system for a substitute font.

When it performs the substitution, ATSUSetTransientFontMatching does not change the font attribute in the style object. As a result, if you plan to redraw a text layout object, you should instead call the function ATSUSetFontFallbacks or ATSUMatchFontsToText.

To ensure that the last resort font will be used if no other fonts are found, you can either call ATSUSetTransientFontMatching or pass the kATSUSequentialFallbacksExclusive constant in the iFontFallbackMethod parameter of ATSUSetFontFallbacks. If you do not set the last resort font, glyphs will be denoted by black boxes when a font is not installed on the user's system.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)